<template>
	<view class="hs-panel">
		<view class="hs-panel-head"><view class="title">收款信息</view></view>
		<view class="hs-panel-body">
			<view class="hs-list-item" v-if="income.receivable_no">
				<view class="hs-list-item-left"><text>收据编号</text></view>
				<view class="hs-list-item-right">{{ income.receivable_no }}</view>
			</view>

			<!-- wedding_income_date -->
			<view class="hs-list-item">
				<view class="hs-list-item-left"><text>收款日期</text></view>
				<view class="hs-list-item-right">{{ income.income_date }}</view>
			</view>

			<!-- income_payment -->
			<view class="hs-list-item">
				<view class="hs-list-item-left"><text>收款方式</text></view>
				<view class="hs-list-item-right">{{ dictionary.getPickerTitle('paymentList', income.income_payment) }}</view>
			</view>
			<!-- income_type -->
			<view class="hs-list-item">
				<view class="hs-list-item-left"><text>款项性质</text></view>
				<view class="hs-list-item-right">{{ dictionary.getPickerTitle('exchangeTypeList', income.income_type) }}</view>
			</view>
			<view class="hs-list-item" v-if="income.income_item_price">
				<view class="hs-list-item-left"><text>收款金额</text></view>
				<view class="hs-list-item-right">{{ income.income_item_price }}</view>
			</view>
			<view class="remark" v-if="income.income_remark">
				<view class="remark-title">备注</view>
				<view class="remark-content">{{ income.income_remark }}</view>
			</view>
			
			<view class="hs-image-group hs-list-border-top" v-if="income.receipt_img && income.receipt_img.length">
				<view class="hs-image-title">凭证</view>
				<view class="hs-image-box">
					<template v-for="(img,index) in income.receipt_img">
						<image class="img" :key="index" mode="widthFix" :src="img" @click="picture.preViewImage(income.receipt_img)"></image>
					</template>
				</view>
			</view>
			
			<view class="hs-image-group hs-list-border-top" v-if="income.note_img && income.note_img.length">
				<view class="hs-image-title">小票</view>
				<view class="hs-image-box">
					<template v-for="(img,index) in income.note_img">
						<image class="img" :key="index" mode="widthFix" :src="img" @click="picture.preViewImage(income.note_img)"></image>
					</template>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
import picture from '@/utils/picture.js';
import dictionary from '@/utils/dictionary.js';

export default {
	props: {
		income: Object
	},
	beforeCreate() {
		this.picture = picture;
		this.dictionary = dictionary;
	}
};
</script>

<style lang="less">
@import url('../common.less');
</style>
